package com.hq.door.util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateSessionFactoryUtil {
	private static final SessionFactory sessionFactory;

	static {

		try {

			sessionFactory = new Configuration().configure().buildSessionFactory();

		} catch (Throwable ex) {
			throw new ExceptionInInitializerError(ex);
		}
	}



	private HibernateSessionFactoryUtil() {

	}



	public static SessionFactory getSessionFactory() {

		return sessionFactory;

	}


}
